package cn.lizhangqu.kb.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import cn.lizhangqu.kb.R;
import cn.lizhangqu.kb.util.CommonUtil;

/**
 * Created by 柯尊诚 on 2015/11/5.
 * kzc
 */
public class Main extends Activity implements View.OnClickListener {

    private Button jwBtn;
    private Button eQueryBtn;
    private Button eleBtn;
    private Button lgrgBtn;
    private Button lgrgBtn2;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        init();
    }

    private void init() {
        jwBtn = (Button) findViewById(R.id.btn_jw);
        eQueryBtn = (Button) findViewById(R.id.btn_equery);
        eleBtn = (Button) findViewById(R.id.btn_ele);
        lgrgBtn = (Button) findViewById(R.id.btn_lgrg);
        lgrgBtn2 = (Button) findViewById(R.id.btn_lgrg2);

        jwBtn.setOnClickListener(this);
        eQueryBtn.setOnClickListener(this);
        eleBtn.setOnClickListener(this);
        lgrgBtn.setOnClickListener(this);
        lgrgBtn2.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_jw :
                CommonUtil.jump2Intent(this, SplashActivity.class);
                break;
            case R.id.btn_equery :
                CommonUtil.jump2Intent(this, EpActivity.class);
                break;
            case R.id.btn_ele :
                CommonUtil.jump2Intent(this, EleActivity.class);
                break;
            case R.id.btn_lgrg :
                CommonUtil.jump2Intent(this, LgrgListActivity.class);
                break;
            case R.id.btn_lgrg2 :
                CommonUtil.jump2Intent(this, Lgrg2Activity.class);
                break;
        }
    }
}
